home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-1.iso / Files / System7 tools / M / Menu Events 1.1.1.sit / Menu Events 1.1.1 / Menu Events Help.rsrc / STR#_1029.txt < prev    next >
Encoding:
Text File  |  1994-04-12  |  10.8 KB  |  663 lines

  1. 
  2.  
  3. 
  4.  
  5. §
  6.  
  7. §
  8.  
  9. √•Menu Events Suite
  10.  
  11. 
  12.  
  13. 
  14.  
  15. The following is a formal description of the Menu Events suite, in the form
  16.  
  17. used in the Apple Event Registry.
  18.  
  19. 
  20.  
  21. 
  22.  
  23. NOTE:  The C header file ‚ÄúMenu Events.h‚Äù¬†contains the constant
  24.  
  25. definitions which appear here.  The ‚ÄúMenu Events Scripting Addition‚Äù file
  26.  
  27. contains an 'aete' resource which records the following dictionary
  28.  
  29. information, for the benefit of scripting packages such as AppleScript.
  30.  
  31. This package also includes a sample script, ‚ÄúMenu Events Sample
  32.  
  33. Script,‚Äù which demonstrates the usage of the following events and
  34.  
  35. parameters.
  36.  
  37. 
  38.  
  39. 
  40.  
  41. 
  42.  
  43. xApple events defined in the Menu Events suite
  44.  
  45. 
  46.  
  47. Name              Requested action
  48.  
  49. 
  50.  
  51. 
  52.  
  53. Query Menu List   List all application-defined menus
  54.  
  55. Query Menu        List all items in a menu
  56.  
  57. Select Menu Item  Perform a menu command
  58.  
  59. 
  60.  
  61. 
  62.  
  63. 
  64.  
  65. xQuery Menu List - list all application-defined menus
  66.  
  67. 
  68.  
  69. A Query Menu List Apple event asks the application to return a list of
  70.  
  71. records containing information about all menus defined by the application
  72.  
  73. in its menu bar.  This information includes the Apple menu, but not the
  74.  
  75. Help, Keyboard, or Application menus.
  76.  
  77. 
  78.  
  79. 
  80.  
  81. Event Class       kMEEventClass
  82.  
  83. 
  84.  
  85. Event ID          kAEMEQueryMenuList
  86.  
  87. 
  88.  
  89. Parameters        none
  90.  
  91. 
  92.  
  93. Reply Parameters
  94.  
  95. 
  96.  
  97. 
  98.  
  99. keyDirectObject
  100.  
  101.                   Description:  A list of Apple event
  102.  
  103.                                 records, one for each
  104.  
  105.                                 menu, each containing the
  106.  
  107.                                 following parameters
  108.  
  109.                   Descriptor Type:  typeAEList
  110.  
  111.                   Required or Optional?  Required
  112.  
  113. 
  114.  
  115. 
  116.  
  117. 
  118.  
  119.    keyMenuID
  120.  
  121.                   Description:  The ID of the menu, not
  122.  
  123.                                 necessarily equal to the
  124.  
  125.                                 ID of the 'MENU' resource
  126.  
  127.                                 it may have come from
  128.  
  129.                   Descriptor Type:  typeShortInteger
  130.  
  131.                   Required or Optional?  Required
  132.  
  133. 
  134.  
  135. 
  136.  
  137.    keyMenuTitle
  138.  
  139.                   Description:  The title of the menu, as
  140.  
  141.                                 it appears in the menu bar
  142.  
  143.                   Descriptor Type:  typeChar
  144.  
  145.                   Required or Optional?  Required
  146.  
  147. 
  148.  
  149. 
  150.  
  151.    keyMenuEnabled
  152.  
  153.                   Description:  Whether or not the menu, as
  154.  
  155.                                 a whole, is enabled
  156.  
  157.                   Descriptor Type:  typeBoolean
  158.  
  159.                   Required or Optional?  Required
  160.  
  161. 
  162.  
  163. 
  164.  
  165. 
  166.  
  167. keyMenuEventsTattoo
  168.  
  169.                   Description:  A null parameter to verify
  170.  
  171.                                 that Menu Events handled
  172.  
  173.                                 the event
  174.  
  175.                   Descriptor Type:  typeNull
  176.  
  177.                   Required or Optional?  Required
  178.  
  179. 
  180.  
  181. 
  182.  
  183. 
  184.  
  185. Result Codes
  186.  
  187.                   mBarNFnd        -126    The application has
  188.  
  189.                                           no menu bar
  190.  
  191. 
  192.  
  193. 
  194.  
  195. 
  196.  
  197. 
  198.  
  199. xQuery Menu - list all items in a menu
  200.  
  201. 
  202.  
  203. A Query Menu Apple event asks the application to return a list of records
  204.  
  205. containing information about all items in a given menu.  This information is
  206.  
  207. complete enough to reconstruct the menu, except for the icon resources
  208.  
  209. referenced by the keyMenuItemIcon parameter.
  210.  
  211. 
  212.  
  213. 
  214.  
  215. Event Class       kMEEventClass
  216.  
  217. 
  218.  
  219. Event ID          kAEMEQueryMenu
  220.  
  221. 
  222.  
  223. Parameters
  224.  
  225. 
  226.  
  227. 
  228.  
  229. keyMenuID
  230.  
  231.                   Description:  The ID of the menu, as
  232.  
  233.                                 returned by a Query Menu
  234.  
  235.                                 List Apple event
  236.  
  237.                   Descriptor Type:  typeShortInteger
  238.  
  239.                   Required or Optional?  Required
  240.  
  241. 
  242.  
  243. 
  244.  
  245. Reply Parameters
  246.  
  247. 
  248.  
  249. 
  250.  
  251. keyDirectObject
  252.  
  253.                   Description:  A list of Apple event
  254.  
  255.                                 records, one for each
  256.  
  257.                                 item, each containing the
  258.  
  259.                                 following parameters
  260.  
  261.                   Descriptor Type:  typeAEList
  262.  
  263.                   Required or Optional?  Required
  264.  
  265. 
  266.  
  267. 
  268.  
  269. 
  270.  
  271.    keyMenuItemID
  272.  
  273.                   Description:  The ID of the item, numbered
  274.  
  275.                                 from 1 at the top of the menu
  276.  
  277.                   Descriptor Type:  typeShortInteger
  278.  
  279.                   Required or Optional?  Required
  280.  
  281. 
  282.  
  283. 
  284.  
  285.    keyMenuItemText
  286.  
  287.                   Description:  The text of the item, as
  288.  
  289.                                 it appears in the menu
  290.  
  291.                   Descriptor Type:  typeChar
  292.  
  293.                   Required or Optional?  Required
  294.  
  295. 
  296.  
  297. 
  298.  
  299.    keyMenuItemEnabled
  300.  
  301.                   Description:  Whether or not the item is
  302.  
  303.                                 enabled
  304.  
  305.                   Descriptor Type:  typeBoolean
  306.  
  307.                   Required or Optional?  Required
  308.  
  309. 
  310.  
  311. 
  312.  
  313.    keyMenuItemMark
  314.  
  315.                   Description:  The mark character of the
  316.  
  317.                                 item, in the lower byte
  318.  
  319.                   Descriptor Type:  typeShortInteger
  320.  
  321.                   Required or Optional?  Required
  322.  
  323. 
  324.  
  325. 
  326.  
  327.    keyMenuItemIcon
  328.  
  329.                   Description:  The icon number of the item,
  330.  
  331.                                 which is 256 less than the
  332.  
  333.                                 resource ID of the 'ICON' or
  334.  
  335.                                 'cicn' resource
  336.  
  337.                   Descriptor Type:  typeShortInteger
  338.  
  339.                   Required or Optional?  Required
  340.  
  341. 
  342.  
  343. 
  344.  
  345.    keyMenuItemStyle
  346.  
  347.                   Description:  The style value of the item,
  348.  
  349.                                 in the lower byte
  350.  
  351.                   Descriptor Type:  typeShortInteger
  352.  
  353.                   Required or Optional?  Required
  354.  
  355. 
  356.  
  357. 
  358.  
  359.    keyMenuItemCmd
  360.  
  361.                   Description:  The Command-key equivalent
  362.  
  363.                                 character of the item, in the
  364.  
  365.                                 lower byte
  366.  
  367.                   Descriptor Type:  typeShortInteger
  368.  
  369.                   Required or Optional?  Required
  370.  
  371. 
  372.  
  373. 
  374.  
  375. 
  376.  
  377. keyMenuEventsTattoo
  378.  
  379.                   Description:  A null parameter to verify
  380.  
  381.                                 that Menu Events handled
  382.  
  383.                                 the event
  384.  
  385.                   Descriptor Type:  typeNull
  386.  
  387.                   Required or Optional?  Required
  388.  
  389. 
  390.  
  391. 
  392.  
  393. 
  394.  
  395. Result Codes
  396.  
  397.                   mBarNFnd        -126    The application has
  398.  
  399.                                           no menu bar
  400.  
  401. 
  402.  
  403. 
  404.  
  405.                   noSuchMenuErr   -21000  The application has
  406.  
  407.                                           no such menu
  408.  
  409. 
  410.  
  411. 
  412.  
  413.                   nonStandardMenuErr
  414.  
  415.                                   -21004  The menu does not
  416.  
  417.                                           use the standard
  418.  
  419.                                           menu definition
  420.  
  421.                                           function
  422.  
  423. 
  424.  
  425. 
  426.  
  427. 
  428.  
  429. 
  430.  
  431. xSelect Menu Item - perform a menu command
  432.  
  433. 
  434.  
  435. A Select Menu Item event requests user interaction to bring the
  436.  
  437. application to the front, then posts mouse events to simulate the selection
  438.  
  439. of the given menu item.  If the Menu event is correctly handled, and the
  440.  
  441. application reacts to the mouse events in the usual way, the result is as if
  442.  
  443. the user had actually selected that menu item.  Interaction will fail if the
  444.  
  445. application refuses to interact with other processes (kAEInteractWithSelf
  446.  
  447. mode), or, if the application is on another machine and the Menu Events
  448.  
  449. extension has been locked, if it refuses to interact with remote processes
  450.  
  451. (kAEInteractWithLocal mode).
  452.  
  453. 
  454.  
  455. Event Class       kMEEventClass
  456.  
  457. 
  458.  
  459. Event ID          kAEMESelectMenuItem
  460.  
  461. 
  462.  
  463. Parameters
  464.  
  465. 
  466.  
  467. 
  468.  
  469. keyMenuID
  470.  
  471.                   Description:  The ID of the menu, as
  472.  
  473.                                 returned by a Query Menu
  474.  
  475.                                 List Apple event
  476.  
  477.                   Descriptor Type:  typeShortInteger
  478.  
  479.                   Required or Optional?  Required
  480.  
  481. 
  482.  
  483. 
  484.  
  485. keyMenuItemID
  486.  
  487.                   Description:  The ID of the item, numbered
  488.  
  489.                                 from 1 at the top of the menu
  490.  
  491.                   Descriptor Type:  typeShortInteger
  492.  
  493.                   Required or Optional?  Required
  494.  
  495. 
  496.  
  497. 
  498.  
  499. Reply Parameters
  500.  
  501. 
  502.  
  503. 
  504.  
  505. keyMenuEventsTattoo
  506.  
  507.                   Description:  A null parameter to verify
  508.  
  509.                                 that Menu Events handled
  510.  
  511.                                 the event
  512.  
  513.                   Descriptor Type:  typeNull
  514.  
  515.                   Required or Optional?  Required
  516.  
  517. 
  518.  
  519. 
  520.  
  521. 
  522.  
  523. Result Codes
  524.  
  525.                   mBarNFnd        -126    The application has
  526.  
  527.                                           no menu bar
  528.  
  529. 
  530.  
  531. 
  532.  
  533.                   errAENoUserInteraction
  534.  
  535.                                   -1713   The application is
  536.  
  537.                                           refusing to interact
  538.  
  539.                                           with other processes
  540.  
  541.                                           or (if Menu Events
  542.  
  543.                                           extension is locked)
  544.  
  545.                                           with remote processes
  546.  
  547. 
  548.  
  549. 
  550.  
  551.                   noSuchMenuErr   -21000  The application has
  552.  
  553.                                           no such menu
  554.  
  555. 
  556.  
  557. 
  558.  
  559.                   noSuchMenuItemErr
  560.  
  561.                                   -21001  The menu has no
  562.  
  563.                                           such item
  564.  
  565. 
  566.  
  567. 
  568.  
  569.                   menuItemDisabledErr
  570.  
  571.                                   -21002  The item is
  572.  
  573.                                           disabled
  574.  
  575. 
  576.  
  577. 
  578.  
  579.                   menuEventPendingErr
  580.  
  581.                                   -21003  Another Menu event
  582.  
  583.                                           is already pending
  584.  
  585.                                           on this application
  586.  
  587. 
  588.  
  589. 
  590.  
  591.                   nonStandardMenuErr
  592.  
  593.                                   -21004  The menu does not
  594.  
  595.                                           use the standard
  596.  
  597.                                           menu definition
  598.  
  599.                                           function
  600.  
  601. 
  602.  
  603. 
  604.  
  605. 
  606.  
  607. 
  608.  
  609. xConstants defined in the Menu Events suite
  610.  
  611. 
  612.  
  613. Constant               Value
  614.  
  615. 
  616.  
  617. 
  618.  
  619. kAEMEQueryMenu         'qmn '
  620.  
  621. kAEMEQueryMenuList     'qmn#'
  622.  
  623. kAEMESelectMenuItem    'semi'
  624.  
  625. keyMenuEnabled         'mnen'
  626.  
  627. keyMenuEventsTattoo    'M√¶nu'
  628.  
  629. keyMenuID              'mnid'
  630.  
  631. keyMenuItemCmd         'micm'
  632.  
  633. keyMenuItemEnabled     'mien'
  634.  
  635. keyMenuItemIcon        'miic'
  636.  
  637. keyMenuItemID          'miid'
  638.  
  639. keyMenuItemMark        'mima'
  640.  
  641. keyMenuItemStyle       'mist'
  642.  
  643. keyMenuItemText        'mite'
  644.  
  645. keyMenuTitle           'mnti'
  646.  
  647. kMEEventClass          'M√¶nu'
  648.  
  649. menuEventPendingErr    -21003
  650.  
  651. menuItemDisabledErr    -21002
  652.  
  653. nonStandardMenuErr     -21004
  654.  
  655. noSuchMenuErr          -21000
  656.  
  657. noSuchMenuItemErr      -21001
  658.  
  659. 
  660.  
  661. 
  662.  
  663.